<html lang="zh-cn">
<head>
{% include "tdm_include_head_template.html" %}
</head>

<body class=" theme-blue">
{% include "tdm_include_navbar_template.html" %}

<div class="container">
  <br/>
  {% include "tdm_include_error_template.html" %}

  {% include "tdm_include_admin_page_template.html" %}

  <div class="form-context">
  <form name="city_form" class="form-horizontal" role="form" action="/tdm/admin/city/" method="post">
    <table id="city" class="table table-hover">
      <tr>
        <th>城市</th>
        <th>区号</th>
        <th>教学点</th>
        <td><button name="op" value="city_del" type="submit" class="btn btn-primary btn-sm">删除</button></td>
      </tr>
      {% for city in city_all %}
      <tr>
        <td>{{city.name}}</td>
        <td>{{city.zipcode}}</td>
        <td><a href="/tdm/admin/venue/{{city.name}}">{{city.venues|length}}</a></td>
        <td><input type="checkbox" name="city" value="{{city.name}}"></td>
      </tr>
      {% endfor %}
      <tr>
        <td>
          <label for="new_city" class="sr-only">城市</label>
          <input name="city" type="text" class="form-control" id="new_city" placeholder="城市">
        </td>
        <td>
          <label for="new_zipcode" class="sr-only">区号</label>
          <input name="zipcode" type="text" class="form-control" id="new_zipcode" placeholder="区号">
        </td>
        <td>&nbsp;</td>
        <td><button name="op" value="city_add" type="submit" class="btn btn-primary btn-sm">添加</button></td>
      </tr>
    </table>
  </form>
  </div>

{% include "tdm_include_footer_template.html" %}
</div>
</body>
</html>